package 数据结构下


object MapOperateDemo01 {
  def main(args: Array[String]): Unit = {
    val list = List(1, 2, 3, 4)
    var list2 = List()

    /*  for (item <- list) {
        list2 = list2 :+ item*2

      }*/
    def myPrint(): Unit = {
      println("hello")
    }

    /*把函数赋给变量但不执行*/
    var l = myPrint _
    /*执行该函数*/
    l()
  }

}
